package linkedlist;

/**
 * @author tong
 * @date 2022/1/7 11:19
 * 约瑟夫问题-环形链表解决
 */
public class Joseph {
    public static void main(String[] args) {
        CircleSingleLinkedList list = new CircleSingleLinkedList();
        Node<Person> node1 = new Node<>(new Person(1, "a"));
        Node<Person> node3 = new Node<>(new Person(3, "c"));
        Node<Person> node5 = new Node<>(new Person(5, "e"));
        list.add(node1);
        list.add(node3);
        list.add(node5);
        System.out.println(list);
    }
}
